[mirrors]
http://matt.ucc.asn.au/dropbear/releases/dropbear-2014.63.tar.bz2

[main]
filesize=1598479
sha512=19eccfc59b239b08c6e7d81707a9194ff43aaa6dcc7b572d149175deae74ce9a08bbd73ce5faab8124b3e6e28c33e4fa0d8eca11414b5ac97850c857c17e9323

[deps]
zlib
sshd-service

[build]
[ -n "$CROSS_COMPILE" ] && xconfflags="--host=$($CC -dumpmachine)"
CPPFLAGS="-D_GNU_SOURCE -D_BSD_SOURCE" \
CFLAGS="$optcflags" \
LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" $xconfflags

# TODO : edit generated options.h

for i in UTMP WTMP PUTUTLINE PUTUTXLINE SYSLOG LASTLOG ; do
	echo "#define DISABLE_$i" >> config.h
done

make SCPPROGRESS=1 PROGRAMS="dropbear scp dbclient dropbearkey dropbearconvert" \
  prefix="$butch_prefix" sbindir="$butch_prefix"/bin DESTDIR="$butch_install_dir" \
  -j$MAKE_THREADS STATIC=1

make SCPPROGRESS=1 PROGRAMS="dropbear scp dbclient dropbearkey dropbearconvert" \
  prefix="$butch_prefix" sbindir="$butch_prefix"/bin DESTDIR="$butch_install_dir" \
  -j$MAKE_THREADS install STATIC=1

[ -e "$butch_prefix"/ssh ] || ln -s dbclient "$butch_install_dir""$butch_prefix"/bin/ssh

IS="$K"/bin/install-service
"$IS" --down --log --force dropbear "$K"/services/dropbear
